<?php

namespace App;

use Illuminate\Database\Eloquent\Model;
class Tasks extends Model
{
	//指定表名
	protected $table='task';
	//指定id
	protected $primaryKey ='id';
	//批量赋值

	public $timestamps= true;

	public function address(){
		return $this->hasOne('App\DeliveryAddress','id','address_id');
	}
	public function goods(){
		return $this->hasOne('App\Goods','id','goods_id');
	}
	public function sale(){
		return $this->hasOne('App\Sales','id','sale_id');
	}
}
